﻿@model IEnumerable<LynxWiki.ViewModels.WikiTopicListingViewData>

@{
    ViewBag.Title = "TopicInboundLinks";
}

<h2>Topic Inbound Links</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="TableClass">
    <tr>
        <th class="TableCellHighlighted">
            @Html.DisplayNameFor(model => model.TopicName)
        </th>
        <th class="TableCellHighlighted">
            @Html.DisplayNameFor(model => model.WikiDir)
        </th>
        <th class="TableCellHighlighted">
            @Html.DisplayNameFor(model => model.CreatedOn)
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td class="TableCell">
            @Html.DisplayFor(modelItem => item.TopicName)
        </td>
        <td class="TableCell">
            @Html.DisplayFor(modelItem => item.WikiDir)
        </td>
        <td class="TableCell">
            @Html.DisplayFor(modelItem => item.CreatedOn)
        </td>
    </tr>
}

</table>
<input type="button" id="btnClose" name="btnClose" value="Close" onclick="CloseWithWindowOpenTrick();" />

@Scripts.Render("~/bundles/syntaxhighlighter")
@Styles.Render("~/Content/SyntaxHighlighter/css")
@section Scripts {
<script type="text/javascript">
    function CloseWithWindowOpenTrick() {
        var objWindow = window.open(location.href, "_self");
        objWindow.close();
    }
  </script>
  <script type="text/javascript">SyntaxHighlighter.all();</script>
}
